package com.dao;

import java.util.List;

import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.po.JobInfoPO;
@Repository
public class JobDao {
	@Autowired
	private SqlSessionTemplate sqlTemplate;
	/**
	 * 查找所有的首页招聘信息
	 * @return
	 */
	public List<JobInfoPO> findJobInfoList() {
		return sqlTemplate.selectList("job.findJobInfoList");
	}
	/**
	 * 根据ID，查找指定的首页招聘信息
	 * @param id
	 * @return
	 */
	public JobInfoPO findJobInfoById(String id) {
		return sqlTemplate.selectOne("job.findJobInfoById", id);
	}
	/**
	 * 修改首页的招聘信息
	 * @param jobInfoPO
	 */
	public void updateJobInfo(JobInfoPO jobInfoPO) {
		sqlTemplate.update("job.updateJobInfo", jobInfoPO);
	}

}
